<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<f:view contentType="text/html"
        xmlns="http://www.w3.org/1999/xhtml"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:a="http://richfaces.org/a4j"
        xmlns:s="http://jboss.com/products/seam/taglib"
        xmlns:r="http://richfaces.org/rich">

    <html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title>Kanji Portal: La librairie de kanji</title>
        <link href="#{facesContext.externalContext.requestContextPath}#{theme.cssTools}" rel="stylesheet"
              type="text/css"/>
        <link href="#{facesContext.externalContext.requestContextPath}#{theme.cssTypo}" rel="stylesheet"
              type="text/css"/>
        <link href="#{facesContext.externalContext.requestContextPath}#{theme.cssModal}" rel="stylesheet"
              type="text/css"/>
        <link href="#{facesContext.externalContext.requestContextPath}#{theme.cssForms}" rel="stylesheet"
              type="text/css"/>
        <link href="#{facesContext.externalContext.requestContextPath}#{theme.cssLayout}" rel="stylesheet"
              type="text/css"/>
        <link href="#{facesContext.externalContext.requestContextPath}#{theme.cssLayoutBase}" rel="stylesheet"
              type="text/css"/>
    </head>

    <body id="page-home">

    <div id="page">
        <a:outputPanel id="pagePanel">

            <div id="header" class="clearfix">

                <div id="branding">
                    <img src="#{facesContext.externalContext.requestContextPath}#{theme.logo}"
                         alt="Content with Style: Web Technique"/>
                </div>
                <!-- end branding -->

                <div id="search">
                    <h:form id="themes">
                        <s:label id="username" rendered="#{identity.loggedIn}">
                            <h:outputText value="#{messages['template.hot.username']}"/>
                        </s:label>
                        <s:label id="anon" rendered="#{!identity.loggedIn}">
                            <h:outputText value="#{messages['template.hot.anon']}"/>
                        </s:label>
                        <s:link id="home" view="/home.xhtml" value="Infos" propagation="none"/>
                        |&nbsp;<s:link id="logout" action="#{identity.logout}"
                                       value="#{messages['template.slink.Logout']}"
                                       rendered="#{identity.loggedIn}" propagation="none"/>
                        <s:link id="login" propagation="none" view="/login.xhtml"
                                value="#{messages['template.slink.Login']}"
                                rendered="#{!identity.loggedIn}"/>
                        <br/>
                        <h:selectOneMenu value="#{localeSelector.localeString}">
                            <a:support event="onchange" action="#{localeSelector.select}" reRender="pagePanel"/>
                            <s:selectItems noSelectionLabel="#{messages['template.ssi.local']}"
                                           var="#{localeSelector.localeString}" value="#{localeSelector.localeString}"/>
                            <f:selectItem itemLabel="English" itemValue="en"/>
                            <f:selectItem itemLabel="Francais" itemValue="fr"/>
                        </h:selectOneMenu>
                    </h:form>
                </div>
                <!-- end search -->

                <hr/>
            </div>
            <!-- end header -->


            <div id="content" class="clearfix">

                <div id="main">
                    <ui:insert name="content"/>
                </div>
                <!-- end main -->

                <div id="local">
                    <ui:decorate template="/menu.xhtml"/>
                </div>
                <!-- end local -->


                <div id="nav">
                    <ui:decorate template="/navigation.xhtml"/>
                </div>
                <!-- end nav -->

            </div>
            <!-- end content -->


            <div id="footer" class="clearfix">
                <ui:decorate template="/footer.xhtml"/>
                <a:log hotkey="M" rendered="#{!ajaxContext.ajaxRequest}"/>
            </div>
            <!-- end footer -->
        </a:outputPanel>
    </div>
    <!-- end page -->
    <!-- start Google analytics token -->
    <script type="text/javascript">
        var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
        document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    </script>
    <script type="text/javascript">
        try {
            var pageTracker = _gat._getTracker("UA-1201360-6");
            pageTracker._trackPageview();
        } catch(err) {
        }
    </script>
    <!-- end Google analytics token -->
    </body>
    </html>
</f:view>
